#!/usr/bin/python

# SCHEMATIC
#
# [RPi IO_4]--[DEL]--[R 100Ohm]--[RPi GND]

import time
import random

# Imports GPIO pilot module
try:
    import RPi.GPIO as GPIO
except RuntimeError:
    print("Error while loading GPIO module! You should perhaps launch this script using superuser privileges.")


# MAIN ROUTINE
if __name__ == "__main__":
    GPIO.setmode(GPIO.BCM)          # Use GPIO pins BCM numbering
    GPIO.setup(4,GPIO.OUT)          # Set pin as output
    GPIO.output(4,True)             # Sets pin 4 to High level
    time.sleep(1)
    GPIO.output(4,False)            # Sets pin 4 to Low level
    time.sleep(1)
    GPIO.cleanup()                  # Resets all input/output/... settings used in the script
